package day12;

import java.util.InputMismatchException;
import java.util.Scanner;

/**
 * @author oldliu
 * @since 1.0
 */
public class Chu {
    public static void main(String[] args) {
        Scanner in = new Scanner(System.in);
        try {
            System.out.println("请输入两个数：");
            int i = in.nextInt();
            int j = in.nextInt();
            int k = i / j;
            System.out.println("商是" + k);
        }catch (InputMismatchException e){
            System.out.println(e);
            System.out.println("输入错误");
            e.printStackTrace();
            ///System.exit(0);不执行finally
        }catch (ArithmeticException e){
            System.out.println("除数不能是0");
            e.printStackTrace();
        }catch (Exception e){
            e.printStackTrace();
        }finally {
            System.out.println("除法计算结束了");
        }

    }
}
